    <body>
    <header class="ui-header ui-header-positive ui-border-b">
        <h1>1905用户资料变更</h1>
    </header>
    <section class="ui-container">
    <div class="ui-form ui-border-t">
        <form action="user/registerAction" method="post" id="form_reg">
            <input type="hidden" name="openid" value="<?=isset($member['openid'])?$member['openid']:''?>"/>
            <div class="ui-form-item ui-border-b">
                <label>
                    昵称
                </label>
                <input type="text" name="nickname" id="nickname" required placeholder="请填写昵称" value="<?=isset($member['nickname'])?$member['nickname']:''?>">

            </div>
            <div class="ui-form-item ui-border-b">
                <label>
                    真实姓名<span class="ui-txt-red">*</span>
                </label>
                <input type="text" name="realname" id="realname" required placeholder="请填写姓名" value="<?=isset($member['realname'])?$member['realname']:''?>">

            </div>
            <div class="ui-form-item ui-border-b">
                <label>
                    身份证号码<span class="ui-txt-red">*</span>
                </label>
                <input type="text" name="identifierno" maxlength="18" id="identifierno" required placeholder="18位身份证号码" <?=isset($member['identifierno'])?' readonly ':''?> value="<?=isset($member['identifierno'])?$member['identifierno']:''?>">

            </div>


            <div class="ui-form-item ui-form-item-l ui-border-b">
                <label class="ui-border-r">
                    中国 +86<span class="ui-txt-red">*</span>
                </label>
                <input type="text" name="mobile" pattern="/^\d{11}$/" maxlength="11" id="mobile" title="11位手机号码" placeholder="请输入手机号码" value="<?=isset($member['mobile'])?$member['mobile']:''?>">
            </div>

            <div class="ui-form-item ui-border-b">
                <label>
                    攒钻宣言
                </label>
                <input type="text" name="slogan" maxlength="18" id="slogan" required placeholder="攒钻宣言" value="<?=isset($member['slogan'])?$member['slogan']:''?>">

            </div>
            <div class="ui-form-item ui-border-b">
                <label>
                    要攒多少
                </label>
                <input type="number" name="expect" id="expect" required placeholder="默认2000元" value="<?=isset($member['expect'])?$member['expect']:''?>">
            </div>

            <div class="ui-form-item ui-form-item-radio ui-border-b">

                <label class="ui-radio" for="canceldeal">
                    <input type="radio" name="canceldeal" <?=$member['canceldeal']==1?'checked':''?> value="1">
                </label>
                <p>绝不放弃</p>
            </div>
            <div class="ui-form-item ui-form-item-radio ui-border-b">

                <label class="ui-radio" for="canceldeal">
                    <input type="radio" <?=($member['canceldeal']==null||$member['canceldeal']==2)?'checked':''?> name="canceldeal" value="2">
                </label>
                <p>退回帮我赞钱的朋友<span style="font-size:smaller;color:gray;">(扣除10%服务费)</span></p>
            </div>
            <div class="ui-form-item ui-form-item-radio ui-border-b">

                <label class="ui-radio" for="canceldeal">
                    <input type="radio" <?=$member['canceldeal']==3?'checked':''?> name="canceldeal" value="3">
                </label>
                <p>退回我的微信零钱<span style="font-size:smaller;color:gray;">(扣除10%服务费)</span></p>
            </div>

            <div class="ui-btn-wrap">
                <button type="button" onclick="dualform()" class="ui-btn-lg ui-btn-primary">
                    确定
                </button>
            </div>

        </form>



    </div>
        </section>

    </body>
    <script>

        function dualform() {

            if(($.trim($("#realname").val())).length==0){
                $.dialog({
                    content : '输入真实姓名',
                    title: '^-^',
                    time : 600
                });
                return false;
            }
            if($("#identifierno").val().length!=18) {
                $.dialog({
                    content : '输入18位身份证号',
                    title: '^-^',
                    time : 600
                });
                return false;
            }

            if(!/\d{11}/.test($("#mobile").val())){
                $.dialog({
                    content : '输入11位手机号',
                    title: '^-^',
                    time : 600
                });
                return false;
            }

            var param = $("#form_reg").serialize();
            $.ajax({
                    type:'POST',
                    url:$("#form_reg").attr('action'),
                    data:param,
                    success:function(data) {

                    $.dialog({
                        content : data.retmsg,
                        title: '^-^',
                        time : 600
                    });
                    setTimeout(function() {
                        location.href=data.gotourl;
                    },1000);
                },
                dataType:'json'
            });
        }

    </script>
</html>